//
//  TTTTSendBottomPickGoodsView.m
//  TaoTuo
//
//  Created by LG on 2020/8/15.
//  Copyright © 2020 刘广. All rights reserved.
//

#import "TTTTSendBottomPickGoodsView.h"

@interface TTTTSendBottomPickGoodsView ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UILabel *chooseAddressLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;


@end

@implementation TTTTSendBottomPickGoodsView

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    self.nameLabel.hidden = YES;
    self.addressLabel.hidden = YES;
    self.addressLabel.adjustsFontSizeToFitWidth = YES;
//    self.chooseAddressLabel.hidden = YES;
    
    self.chooseAddressSubject = [RACSubject subject];
    self.chooseTimeSubject = [RACSubject subject];
}

- (void)setModel:(TTAddressModel *)model
{
    _model = model;
    
    self.nameLabel.text = [NSString stringWithFormat:@"%@   %@", model.ReceiverName, model.ReceiverMobile];
    self.addressLabel.text = [NSString stringWithFormat:@"%@%@%@%@", model.Province, model.City, model.Area, model.Address];
    
    self.nameLabel.hidden = NO;
    self.addressLabel.hidden = NO;
    
    self.chooseAddressLabel.hidden = YES;
    
}

- (void)setTime:(NSString *)time
{
    _time = time;
    self.timeLabel.text = time;
}

/// 选择地址
- (IBAction)clickChooseAddressBtn:(id)sender {
    
    [self.chooseAddressSubject sendNext:self];
    
}

/// 选择时间
- (IBAction)chooseTimeBtnClick:(id)sender {
    
    [self.chooseTimeSubject sendNext:self];
    
}



@end
